function OUT = gmmom(vadist)

E2 = arrayfun(@(i) vadist.cov(:,:,i) + vadist.mean(:,i)*vadist.mean(:,i)',(1:numel(vadist.pr)),'unif',0);
E2 = sum(bsxfun(@times,cat(3,E2{:}),reshape(vadist.pr,[1 1 numel(vadist.pr)])),3);
E = vadist.mean*vadist.pr';

OUT = struct();
OUT.mean = E;
OUT.cov = E2 - E*E';
[OUT.sd,OUT.corr] = cov2corr(OUT.cov);
